<!-- $Id: batch_add_comments.htm 20150319 rubing.zhao $ -->
{include file="pageheader.htm"}
<style type="text/css">
    .file-box{ position:relative;width:340px}
    .txt{  width:180px;}
    .file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px }
</style>
<div class="main-div">
    <form action="batch.php?act=comments_upload" method="post" enctype="multipart/form-data" name="theForm" onsubmit="return formValidate()">
        <table cellspacing="1" cellpadding="3" width="100%">
          <tr>
            <td class="label">
              <a href="javascript:showNotice('noticeFile');" title="{$lang.form_notice}"><img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.batch_import_users2}
            </td>
            <td>
                <div class="file-box">
                    <input type='text' name='textfield' id='textfield' class='txt' />
                    <input type='submit' class='button' value='浏览...' />
                    <input type="file" name="users_file" class="file" id="fileField" size="28" onchange="document.getElementById('textfield').value=this.value" />
                    {$lang.require_field}<br/>
                    <span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="noticeFile">{$lang.notice_file}</span>
                </div>
            </td>
          </tr>
          <tr>
            <td class="label">
                {$lang.batch_import_comments}
            </td>
            <td>
                <div class="file-box">
                    <input type='text' name='textfield' id='textfield2' class='txt' />
                    <input type='submit' class='button' value='浏览...' />
                    <input type="file" name="comments_file" class="file" id="fileField2" size="28" onchange="document.getElementById('textfield2').value=this.value" />
                    {$lang.require_field}<br/>
                    <span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="noticeFile">{$lang.notice_file2}</span>
                </div>
            </td>
          </tr>
          <tr>
            <td class="label">
                {$lang.order_goods_id}
            </td>
            <td>
                <textarea name="goods_id_arr" rows="8" cols="50"></textarea>{$lang.require_field}{$lang.goods_id_set}
            </td>
          </tr>
          <tr>
            <td class="label">
                {$lang.comment_num}
            </td>
            <td>
                <input type="text" name="comment_num" value="1">{$lang.require_field}{$lang.comment_num_set}
            </td>
          </tr>
          <tr>
            <td class="label">
            </td>
            <td>
                <input name="submit" type="submit" id="submit" value="{$lang.add_comments_submit}" class="button"/>
                <input type="reset" value="{$lang.button_reset}" class="button" />
            </td>
          </tr>
        </table>
    </form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
    var elements;
    onload = function()
    {
        // 文档元素对象
        elements = document.forms['theForm'].elements;

        // 开始检查订单
        startCheckOrder();
    };
    /**
     * 检查输入是否完整
     */
    function formValidate()
    {
        if (elements['goods_id_arr'].value == '')
        {
            alert(please_write_goods_id);
            return false;
        }
        if (elements['comment_num'].value == '')
        {
            alert(please_write_comment_num);
            return false;
        }
        if (elements['users_file'].value == '')
        {
            alert(please_upload_file);
            return false;
        }
        if (elements['comments_file'].value == '')
        {
            alert(please_upload_file2);
            return false;
        }
        return true;
    }
</script>
{/literal}
{include file="pagefooter.htm"}